You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The local HTTP server started by nx graph sent Access-Control-Allow-Origin: * on every response, letting any website a developer visited read the server's responses cross-origin — including the full project graph and the output of the /help endpoint, which runs a target's configured help command. The practical impact is typically cross-origin information disclosure, but can be arbitrary command injection in rare cases.
Severity
Exploitation requires the developer to be running nx graph and to visit an attacker page. Any execution beyond benign help commands also requires a malicious target to already be present in the workspace (see Details).
Affected & Patched Versions
Package: nx (npm).
Affected:>= 17.0.4, < 22.7.2 and >= 23.0.0-beta.0, < 23.0.0-beta.2
Patched:22.7.2+ (backport) and 23.0.0 (first in 23.0.0-beta.2)
The wildcard CORS header was introduced in 17.0.4; the /help execution endpoint in 19.4.0. The 21.x line is not patched — 21.x users should upgrade to 22.7.2 or later.
Details
nx graph starts a local server (default http://127.0.0.1:4211). Before the fix, its request handler set a wildcard CORS header on every response:
res.setHeader('Access-Control-Allow-Origin','*');
The /help endpoint runs a target's configured command:
A GET /help is a CORS "simple request", so a malicious page could fetch() it with no preflight, and the wildcard header let the page read the result. This exposes the project graph (project names, file paths, dependencies, build configuration) and the output of any configured help command.
The command is not attacker-controlled through the request — it comes from the workspace's project configuration, and first-party plugins (jest, vite, cypress) populate it with benign, read-only help commands. For /help to run anything malicious, a target carrying a malicious help.command must already exist in the project graph, which can only be introduced by installing a malicious package or by altering the workspace's own code/configuration — both of which already grant code execution independent of this flaw.
The fix (#35494) removes the header; the browser's same-origin policy then blocks cross-origin reads.
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: npm-shrinkwrap.json
npm ERR! Cannot read properties of null (reading 'matches')
npm ERR! A complete log of this run can be found in: /runner/cache/others/npm/_logs/2026-08-21T03_55_21_637Z-debug-0.log
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
renovateBot
changed the title
chore(deps): update dependency nx to v23 [security]
chore(deps): update dependency nx to v22 [security]
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^18.0.4→^22.7.2nx graphdev server permissive CORS policyCVE-2026-54753 / GHSA-g2r8-wvmj-jf5w
More information
Details
Summary
The local HTTP server started by
nx graphsentAccess-Control-Allow-Origin: *on every response, letting any website a developer visited read the server's responses cross-origin — including the full project graph and the output of the/helpendpoint, which runs a target's configured help command. The practical impact is typically cross-origin information disclosure, but can be arbitrary command injection in rare cases.Severity
Exploitation requires the developer to be running
nx graphand to visit an attacker page. Any execution beyond benign help commands also requires a malicious target to already be present in the workspace (see Details).Affected & Patched Versions
Package:
nx(npm).>= 17.0.4, < 22.7.2and>= 23.0.0-beta.0, < 23.0.0-beta.222.7.2+ (backport) and23.0.0(first in23.0.0-beta.2)The wildcard CORS header was introduced in
17.0.4; the/helpexecution endpoint in19.4.0. The21.xline is not patched —21.xusers should upgrade to22.7.2or later.Details
nx graphstarts a local server (defaulthttp://127.0.0.1:4211). Before the fix, its request handler set a wildcard CORS header on every response:The
/helpendpoint runs a target's configured command:A
GET /helpis a CORS "simple request", so a malicious page couldfetch()it with no preflight, and the wildcard header let the page read the result. This exposes the project graph (project names, file paths, dependencies, build configuration) and the output of any configured help command.The command is not attacker-controlled through the request — it comes from the workspace's project configuration, and first-party plugins (jest, vite, cypress) populate it with benign, read-only help commands. For
/helpto run anything malicious, a target carrying a malicioushelp.commandmust already exist in the project graph, which can only be introduced by installing a malicious package or by altering the workspace's own code/configuration — both of which already grant code execution independent of this flaw.The fix (#35494) removes the header; the browser's same-origin policy then blocks cross-origin reads.
References
/help)Credits
Thanks to Nozomu Sasaki (Paul) (@morimori-dev) for finding and responsibly reporting this issue.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
nrwl/nx (nx)
v22.7.2Compare Source
22.7.2 (2026-05-14)
🚀 Features
🩹 Fixes
nx mcpto run outside of an Nx workspace (#35655)❤️ Thank You
v22.7.1Compare Source
22.7.1 (2026-04-28)
🩹 Fixes
❤️ Thank You
v22.7.0Compare Source
22.7.0 (2026-04-24)
🚀 Features
🩹 Fixes
❤️ Thank You
v22.6.5Compare Source
22.6.5 (2026-04-10)
🚀 Features
🩹 Fixes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.